/**
* ...
* @author sminutoli
* @version 0.1
* 
*/
import com.dmotiko.util.*

class DataTypeUtil {
		
		public static function getClassName(fullPath:String):String {
			return fullPath.substr(fullPath.lastIndexOf(".")+1);
		}
		
		public static function matchName(fullPath:String, name:String):Boolean {
			return getClassName(fullPath) == name;
		}
		
		public static function traceObject(data, name:String, iterate:Boolean, func):Void {
			for(var s:String in data){
				
				if(!func) trace(name+"."+s+" = "+data[s]);
				else func(name+"."+s+" = "+data[s]);
				
				if(iterate) DataTypeUtil.traceObject(data[s], name+"."+s, true, func);
			}
		}
		
}